/**
 * Project Name:guoan
 * File Name:WebConfig.java
 * Package Name:guoan.core.common
 * Date:2015年4月13日下午1:36:19
 * Copyright (c) 2015, www.sim.com All Rights Reserved.
 *
 */

package guoan.core.common;

/**
 * ClassName:WebConfig <br/>
 * Function: TODO ADD FUNCTION. <br/>
 * Reason: TODO ADD REASON. <br/>
 * Date: 2015年4月13日 下午1:36:19 <br/>
 * 
 * @author he.sun
 * @version
 * @since JDK 1.7
 * @see
 */
public class WebConfig {

    /**
     * 客服登陆后在 Session中的KEY值
     */
    public final static String SESSION_USER_KEY = "GUOAN_SESSION_USER";
    /**
     * weixin Session中的KEY值
     */
    public final static String SESSION_WEIXIN_USER_KEY = "GUOAN_SESSION_WEIXIN_USER";

    /**
     * weixin Session中的 openid KEY值
     */
    public final static String SESSION_WEIXIN_OPENID_KEY = "GUOAN_SESSION_WEIXIN_OPENID";
    /**
     * 预约考试每个时间点最大报名数.
     */
    public final static int EXAM_OPENHOURS_MAX = 40;

    /**
     * 预约陪练最大随机码
     */
    public final static int EXAM_COACH_MAX = 50;

    /**
     * 预约考试开放时间
     */
    public final static int[] EXAM_OPENHOURS_RANGE = { 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
            17, 18, 19, 20 };
    /**
     * 预约考试取消的时间限制间隔，分钟
     */
    public final static int CANCEL_MAC_EAXK_JOIN_SP = 0;

    /**
     * @Fields COACH_JG_DEFALUT : 科目二默认间隔15分钟
     */
    public final static int COACH_JG_DEFALUT = 20;

    public final static String SYS_CONFIG_KEY_COACH_2_JG = "DEF_JG";

    public final static String ADV_TYPE_TEXT = "text";

    public final static String ADV_TYPE_IMG = "img";

    /**
     * @Fields KEYWORD_KEY_INFO_ADV : 关键字 adv
     */
    public final static String KEYWORD_KEY_INFO_ADV = "adv";
    public final static String KEYWORD_KEY_INFO_AUTOFROM = "autofrom";
    public final static String KEYWORD_KEY_INFO_ADV_HOME = "adv_home";
    public final static String KEYWORD_KEY_INFO_ADV_GAME = "adv_game";
    public final static String KEYWORD_KEY_INFO_WORDS = "words";
    public final static String KEYWORD_KEY_INFO_WORDJLS = "wordjls";

    public final static String KEYWORD_KEY_INFO_EXAM = "exam";

    public final static String KEYWORD_KEY_INFO_COACH = "coach";

    public static final String WEIXIN_MEDIA_IMG = "image";

    public static final String WEIXIN_MENU_NOKEY = "KEY_NO";

    public static String findAppLink(String keyInfo, Long keyInfoId){
        // TODO Auto-generated method stub
        String link = null;
        switch (keyInfo) {
            case KEYWORD_KEY_INFO_ADV:
                link = "/weixin/adv/content/" + keyInfoId;
                break;
            case KEYWORD_KEY_INFO_EXAM:
                link = "/weixin/exam/index";
                break;
            case KEYWORD_KEY_INFO_ADV_HOME:
                link = "/weixin/adv/index";
                break;
            case KEYWORD_KEY_INFO_ADV_GAME:
                link = "/weixin/adv/indexGame/" + keyInfoId;
                break;
            case KEYWORD_KEY_INFO_AUTOFROM:
                link = "/weixin/autoForm/show?autoFormId=" + keyInfoId;
                break;
            case KEYWORD_KEY_INFO_WORDS:
                link = "/weixin/words/index";
                break;
            case KEYWORD_KEY_INFO_WORDJLS:
                link = "/weixin/wordjls/index";
                break;
            default:
                break;
        }
        return link;
    }
}
